package com.smvc.handlers;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("skip")
public class SkipController {
	
	@RequestMapping("skip")
	public String skip(){
		return "home";
	}
	
	/**
	  转发到页面	
	 */
	@RequestMapping("forward")
	public String forward(){
		return "forward:/WEB-INF/views/home.jsp";
	}
	
	//重定向到WEB-INF下面的页面是不可以的
	@RequestMapping("redirect")
	public String redirect(){
		return "redirect:/WEB-INF/views/home.jsp";
	}
	
	/**
	  重定向到页面
	 */
	@RequestMapping("redirect2")
	public String redirect2(){
		return "redirect:/ok.jsp";
	}
	
	/**
	  转发到Action
	 */
	@RequestMapping("forwardAction")
	public String forwardAction(){
		return "forward:/skip/skip";
	}
	
	/**
	 重定向到Action
	 */
	@RequestMapping("redirectAction")
	public String redirectAction(){
		return "redirect:/skip/skip";
	}
}
